/*
 * launcher_despacho.cpp
 *
 */

#include "../middleware/CommunicationDespacho.h"
#include "../middleware/CommunicationRobot16.h"
#include "../middleware/CommunicationAdpt.h"
#include "../channel_common/AgentIdManager.h"
#include "../channel_common/ChannelInterface.h"
#include "../IPC/ProcessAux.h"
#include "../common/Argv.h"
#include "../capa_servicios_distribuidos/QueueLauncher.h"
#include "../middleware/CommunicationVendedor.h"
#include "../control/clienteCommon.h"

int main(int argc, char**argv)
{
	std::string hostName = "cliente_pc";
	ipc::Sequence::create(CLIENTEID_SEQUENCE_PATH,CLIENTEID_SEQUENCE_KEY);

	channel::ChannelInterface::create(hostName);

	Argv args;
	args.pushArg(hostName);
	ProcessAux::launchProcess2("./out/channel_out_agente",1,args);
	ProcessAux::launchProcess2("./out/channel_in_agente",1,args);

	middleware::CommunicationVendedor::create(middleware::CommunicationVendedor::CLIENTE,hostName);
	middleware::CommunicationDespacho::create(middleware::CommunicationDespacho::CLIENTE,hostName);
}
